
<ion-header>
  <ion-navbar color="primary">
    <ion-title style="text-align: center">组织要闻
    </ion-title>
    <ion-buttons end *ngIf="flag">
      <button ion-button icon-left (click)="addNews()">
        <ion-icon name="add" ></ion-icon>
      </button>
    </ion-buttons>
  </ion-navbar>

  <!-- <ion-toolbar>
    <ion-searchbar placeholder="搜索新闻" (ionInput)="searchNews($event)"  (ionClear)="resetNews($event)"  ></ion-searchbar>
  </ion-toolbar> -->

</ion-header>

<ion-content padding>

  <ion-refresher (ionRefresh)="doRefresh($event)">
    <ion-refresher-content 
    pullingIcon="arrow-dropdown"
    pullingText="下拉刷新"
    refreshingSpinner="circles"
    refreshingText="数据刷新...">
    </ion-refresher-content>
  </ion-refresher>

  <!-- 虚拟滚动 -->
  <ion-list [virtualScroll]="news" [approxItemHeight]="'200px'">
    <ion-item *virtualItem="let news" (click)="itemTapped(news)">
      <ion-thumbnail item-start>
        <ion-img [src]="news.img" cache=true></ion-img>
      </ion-thumbnail>
      <h2>{{news.name}}</h2>
      <p>{{news.time}}</p>
    </ion-item>
  </ion-list>

  <ion-infinite-scroll (ionInfinite)="doInfinite($event)">
    <ion-infinite-scroll-content loadingText="加载数据..."></ion-infinite-scroll-content>
  </ion-infinite-scroll>  


</ion-content>
